package org.rambadger.command.command;


import org.axonframework.commandhandling.annotation.TargetAggregateIdentifier;
import org.hibernate.validator.constraints.Length;
import org.rambadger.command.validation.UrlIdentifier;

import javax.validation.constraints.NotNull;


public class CreateSubmission {
    @TargetAggregateIdentifier
    private final String username;
    //Compound key {
    private final String platformId;
    private final String assignmentId;
    //}

    private final String message;

    public CreateSubmission(String username, String platformId, String assignmentId, String message) {
        this.username = username;
        this.platformId = platformId;
        this.assignmentId = assignmentId;
        this.message = message;
    }

    @UrlIdentifier @NotNull
    public String getUsername() {
        return username;
    }

    @UrlIdentifier @NotNull
    public String getPlatformId() {
        return platformId;
    }

    @UrlIdentifier @NotNull
    public String getAssignmentId() {
        return assignmentId;
    }

    @Length(max = 4096) @NotNull
    public String getMessage() {
        return message;
    }
}
